package com.tongjie.hotelbooking.im.message.repository;

import com.tongjie.hotelbooking.im.conversation.entiry.Conversation;
import com.tongjie.hotelbooking.im.message.entiry.ImMessage;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface ImMessageRepository extends JpaRepository<ImMessage, Long>, JpaSpecificationExecutor<ImMessage> {

    Page<ImMessage> findImMessagesByConversation(Conversation conversation, Pageable pageable);

}
